Conventionally, an art for controlling a movement of an object displayed on a screen on the basis of an input form a pointing device, such as a touch panel, etc. is well known.
In a related art described in a Patent Document 1 (Japanese Patent Application Laid-Open No. 2005-193006), for example, it is determined whether or not position coordinates first detected from a touch panel are included in a display area of an operation object, and if the position coordinates first detected are included in the display area, the operation object is moved according to the input. More specifically, a continuous input time to the touch panel is measured, and a movement velocity of the object is calculated such that as the continuous input time is short, the initial velocity is high. Furthermore, position coordinates data at a time of starting an input to the touch panel (starting point) and position coordinates data at a time of ending the input (ending point) are detected, and a difference between the starting point and the ending point is calculated. The movement velocity of the object is calculated such that the wider the difference is, the higher the initial velocity is (and vice versa).
In addition, in a related art described in a Patent Document 2 (Japanese Patent Application Laid-Open No. 2006-149662), an operation object is moved by performing a stroke operation (stroking operation on the touch panel) at an arbitrary position on a touch panel. More specifically, a movement velocity of the object is calculated on the basis of a length of the stroking operation. For example, it is determined whether or not a difference of the touched coordinates is above a predetermined threshold value. When the object is stopped, if the difference is above the predetermined threshold value, a novel velocity is decided as a constant velocity A, and if the difference is equal to or less than the predetermined threshold value, a novel velocity is decided as 0. Furthermore, while the object moves, if the difference is equal to or less than the predetermined threshold value, a novel velocity is calculated by subtracting deceleration (B+α) larger than a constant deceleration B from the constant velocity A, and if the difference is above the predetermined threshold value, a novel velocity is decided as a constant velocity A.
The arts in the above-described Patent Documents 1 and 2 are not such kinds of deciding a movement velocity of an object on the basis of a distance between a straight line connecting two input coordinates and a target to be operated.
Furthermore, in the art of the Patent Document 1, the player has to perform an operation for a movement control by touching the object. If a plurality of objects is displayed on the screen, a size of each of the objects is small to make it difficult to instruct each of the objects with the pointing device, resulting in low operability.
On the other hand, in the related art of the Patent Document 2, the user can move the object by performing a stroking operation at an arbitrary position on the touch panel without touching the object. In a case of one object, such a movement control can be applied while in a case that there is a plurality of operation objects, it cannot be applied.
Therefore, example embodiments provide a novel storage medium storing a movement controlling program and a novel movement controlling apparatus.
Certain example embodiments provide a storage medium storing a movement controlling program and a movement controlling apparatus which are able to control a movement of an object in various ways.
Certain example embodiments provide a storage medium storing a movement controlling program and a movement controlling apparatus which offer high operability for a movement control of an object.
Certain example embodiments employ the following features in order to solve the above-described problems. It should be noted that reference numerals inside the parentheses and supplement show one example of a corresponding relationship with the embodiments described herein.
In an example embodiment a storage medium storing a movement controlling program to be executed in a computer of a movement controlling apparatus provided with a display means for displaying at least an operation object to be operated by a player on a screen and a pointing device for instructing a position on the screen of the display means. The movement controlling program causes the computer to execute an input coordinates detecting step, a distance calculating step, a movement velocity calculating step, and a movement processing step. The input coordinates detecting step detects input coordinates indicating a position on the screen to be instructed by the pointing device for each predetermined time. The distance calculating step calculates a distance between a straight line connecting previous input coordinates and current input coordinates which are detected by the input coordinates detecting step and the operation object. The movement velocity calculating step calculates a movement velocity of the operation object on the basis of the distance calculated by the distance calculating step. The movement processing step moves the operation object on the basis of the movement velocity calculated by the movement velocity calculating step.
In an example embodiment, a movement controlling apparatus (10) includes a display means (12, 14) and a pointing device (24). A movement controlling program causes a computer (34) of the movement controlling apparatus to execute steps described below, and controls a movement of the operation object (104) displayed on the screen by an input of the pointing device. An input coordinates detecting step (S9, S43, S45) detects input coordinates indicative of an instructed position on the screen for each predetermined time. A distance calculating step (S53, S55) calculates a distance (cD) between a straight line connecting previous input coordinates (f0)) and current input coordinates (f1) and the operation object. For example, an intersection point (c) between a perpendicular line dropped from the reference point (center point B0) of the operation object and a straight line between the input coordinates is calculated, and then, a distance between the intersection point and the reference point may be calculated. A movement velocity calculating step (S65) calculates a movement velocity (v1) of the operation object on the basis of the calculated distance. For example, a current movement velocity vector (v0) and the input vector depending on a distance are combined to thereby calculate a movement velocity vector. A movement processing step (S19) moves the operation object on the basis of the calculated movement velocity.
In certain example embodiments, since the movement velocity is calculated on the basis of the distance between the straight line between the input coordinates and the operation object, the movement velocity of the operation object can be changed depending on the distance, capable of controlling the movement of the operation object in various ways.
Another example embodiment includes a storage medium storing a movement controlling program where the movement velocity calculating step increases the movement velocity as the distance is short.
In certain example embodiments, as the distance between the straight line between the input coordinates and the operation object is short, the movement velocity of the operation object can be increased, capable of offering reality to the movement control of the operation object.
In certain example embodiments, a storage medium storing a movement controlling program and the movement controlling program causes the computer to further execute a nearest point calculating step. The nearest point calculating step calculates a nearest point to the reference point of the operation object out of the points in the straight line. The distance calculating step calculates a distance between the nearest point calculated by the nearest point calculating step and the reference point of the operation object.
In certain example embodiments, a nearest point calculating step (S53) calculates a nearest point to a reference point of the operation object (c) out of the points in the straight line. The reference point of the operation object is a center point, a center of gravity, etc., and the operation object is arranged at a position of the reference point in the game space. The distance calculating step calculates a distance between the nearest point and the reference point.
In certain example embodiments, the movement velocity can be calculated on the basis of the shortest distance between the straight line between the input coordinates and the operation object, and therefore, it is possible to change the movement velocity of the operation object how accurately the position instructed by the pointing device captures the operation object.
In certain example embodiments, a storage medium storing a movement controlling program includes where the operation object is a circular object and where the movement controlling program causes the computer to execute a hit determining step. The hit determining step determines whether or not an area set on the basis of an input direction from the previous input coordinates to the current input coordinates and a radius of the circular object, and an input line segment connecting said previous input coordinates and said current input coordinates intersect with each other. The movement velocity calculating step calculates a movement velocity of the circular object on the basis of the distance when it is determined by the hit determining step that the area and the input line segment intersects with each other.
In certain example embodiments, the operation object is a circular object. The circular object is set with a hit determining area on the basis of the radius (r) and an input direction by the player. More specifically, a hit determination step (S59, S61) determines whether or not an area set on the basis of an input direction from the previous input coordinates to the current input coordinates and the radius, and an input line segment intersect with each other. The hit determination may be separately performed in relation to a direction vertical to the input direction and in relation to the input direction. Furthermore, the wideness of an effective area in the direction vertical to the input direction and the wideness of the effective area in the input direction may be set to be different from each other. The movement velocity calculating step calculates a movement velocity on the basis of the distance when the area and the input line segment intersect with each other.
In certain example embodiments, only when an input to the effective area which is set based on the radius of the circular object and an input direction by the player is made, a movement of the object can be operated.
In certain example embodiments, a storage medium storing a movement controlling program includes where the movement velocity calculating step includes a difference calculating step for calculating a difference between the previous input coordinates and the current input coordinates which are detected by the input coordinates detecting step, and calculates a movement velocity of the operation object on the basis of the difference further.
In certain example embodiments, when the movement velocity is calculated, a difference (f1−f0) between the previous input coordinates and the current input coordinates is calculated. The movement velocity is calculated on the basis of the distance and the difference.
In certain example embodiments, since the movement velocity of the operation object is calculated on the basis of the difference between the input coordinates in addition to the distance between the straight line between the input coordinates and the operation object, the movement of the operation object can be controlled in various ways, capable of increasing reality during movement.
In certain example embodiments a movement controlling apparatus provided with a display means for displaying at least an operation object to be operated by a player on a screen and a pointing device for instructing a position on the screen of the display means, and controlling a movement of the operation object according to an input by the pointing device. The movement controlling apparatus comprises an input coordinates detecting means, a distance calculating means, a movement velocity calculating means, and a movement processing means. The input coordinates detecting means detects input coordinates indicating a position on the screen to be instructed by the pointing device for each predetermined time. The distance calculating means calculates a distance between a straight line connecting previous input coordinates and current input coordinates which are detected by the input coordinates detecting means and the operation object. The movement velocity calculating means calculates a movement velocity of the operation object on the basis of the distance calculated by the distance calculating means. The movement processing means moves the operation object on the basis of the movement velocity calculated by the movement velocity calculating means.
In certain example embodiments, a movement controlling apparatus corresponding to a storage medium storing a movement controlling program is provided and have one or more similar advantages to those described herein.
In certain example embodiments, since the operation object can be moved at the movement velocity calculated on the basis of the distance between the straight line connecting the input coordinates and the operation object, it is possible to change the movement velocity of the operation object depending on the distance. That is, it is possible to control the movement of the operation object in various ways.
Furthermore, since the movement velocity is calculated on the basis of the distance, even if a plurality of operation objects exists, it is possible to control a movement velocity of each of the operation objects on the basis of the distance between the straight line connecting the input coordinates and each of the operation objects. Thus, operability for a movement control of the object is enhanced.
The above described objects and other objects, features, aspects and advantages of certain example embodiments will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.